![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@equinor/fusion-framework-module-services
Advanced tools
This module provides a set of services and utilities to manage user bookmarks. It allows for creating, reading, updating, and deleting bookmarks, ensuring that users can easily save and retrieve their favorite or frequently accessed items. The module is designed to be flexible and scalable, supporting various types of bookmarks and integrating seamlessly with other parts of the application.
To create an instance of the BookmarksApiClient
, you need to provide an HTTP client and specify the method for API requests.
import { BookmarksApiClient } from '@equinor/fusion-framework-module-services';
import { HttpClient } from '@equinor/fusion-framework-module-http/client';
// Create an instance of the HTTP client
const httpClient = new HttpClient();
// Create an instance of the BookmarksApiClient
const bookmarksClient = new BookmarksApiClient(httpClient, 'json');
You can fetch all bookmarks using the getAll
method.
const allBookmarks = await bookmarksClient.getAll('v1');
console.log(allBookmarks);
To create a new bookmark, use the create
method.
const newBookmark = await bookmarksClient.create('v1', {
name: 'My Bookmark',
description: 'A description for my bookmark',
isShared: true,
payload: { key: 'value' },
});
console.log(newBookmark);
To update an existing bookmark, use the patch
method.
const updatedBookmark = await bookmarksClient.patch('v1', {
bookmarkId: 'bookmark-id',
data: {
name: 'Updated Bookmark Name',
payload: { key: 'new value' },
}
});
console.log(updatedBookmark);
To delete a bookmark by its ID, use the delete
method.
const deletedBookmarkId = await bookmarksClient.delete('v1', { bookmarkId: 'bookmark-id' });
console.log(`Deleted bookmark with ID: ${deletedBookmarkId}`);
You can add or remove bookmarks from the user's favorites.
// Add to favorites
await bookmarksClient.addFavourite('v1', { bookmarkId: 'bookmark-id' });
// Remove from favorites
await bookmarksClient.removeFavorite('v1', { bookmarkId: 'bookmark-id' });
To fetch the payload of a specific bookmark, use the getPayload
method.
const bookmarkPayload = await bookmarksClient.getPayload('v1', { bookmarkId: 'bookmark-id' });
console.log(bookmarkPayload);
FAQs
Unknown package
The npm package @equinor/fusion-framework-module-services receives a total of 0 weekly downloads. As such, @equinor/fusion-framework-module-services popularity was classified as not popular.
We found that @equinor/fusion-framework-module-services demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.